package com.hnas.eastsquare.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.hnas.eastsquare.dao.SediBalanceChangeRecordDao;
import com.hnas.eastsquare.domain.EastSquareCountAndAmount;
import com.hnas.eastsquare.orm.SediBalanceChangeRecord;

@Component("sediBalanceChangeRecordService")
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class SediBalanceChangeRecordServiceImpl implements SediBalanceChangeRecordService{

	@Autowired
	private SediBalanceChangeRecordDao sediBalanceChangeRecordDao;
	
	@Override
	public SediBalanceChangeRecord saveOrUpdate(SediBalanceChangeRecord vo) throws Exception {
		return this.sediBalanceChangeRecordDao.saveOrUpdate(vo);
	}

	@Override
	public List<SediBalanceChangeRecord> findEastSquareAll(String date) {
		return this.sediBalanceChangeRecordDao.findEastSquareAll(date);
	}

	@Override
	public EastSquareCountAndAmount getCountAndAmount(String date) {
		return this.sediBalanceChangeRecordDao.getCountAndAmount(date);
	}

	@Override
	public SediBalanceChangeRecord findByOrderNo(String orderNo) {
		return this.sediBalanceChangeRecordDao.findByOrderNo(orderNo);
	}

}
